package com.itheima.reggie.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.reggie.domain.Category;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CategoryMapper extends BaseMapper<Category> {

    //查询所有
    List<Category> findAll();
    //保存
    void save(Category category);
   //修改
    void update(Category category);

    //根据分类id查询菜品数量
    Integer countDishByCategoryId(Long id);

    //根据分类id查询套餐数量
    Integer countSetmealByCategoryId(Long id);

    //根据分类id删除
    void delete(Long id);

}
